import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/LoginView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: HomeView
  },
  {
    path: '/notice',
    name: 'notice',
    component: () => import('../views/NoticeView.vue')
  },
  {
    path: '/adminnotice',
    name: 'adminnotice',
    component: () => import('../views/AdminNoticeView.vue')
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/product',
    name: 'product',
    component: () => import('../views/ProductView.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/HomeView.vue')
  },
  {
    path: '/person',
    name: 'person',
    component: () => import('../views/PersonView.vue')
  },
  {
    path: '/personbook',
    name: 'personbook',
    component: () => import('../views/PersonBookView.vue')
  },
  {
    path: '/main',
    name: 'main',
    component: () => import('../views/MainView.vue')
  },
  {
    path: '/store',
    name: 'store',
    component: () => import('../views/StoreView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/userview',
    name: 'userview',
    component: () => import('../views/UserView.vue')
  },
  {
    path: '/userborrowview',
    name: 'userborrowview',
    component: () => import('../views/UserBorrowView.vue')
  },
  {
    path: '/chapter',
    name: 'chapter',
    component: () => import('../views/NovelChapterView.vue')
  },
  {
    path: '/detail/:bookid',
    name: 'detailView',
    component: () => import('../views/detailView.vue')
  },
  {
    path: '/novel/:novelName',
    name: 'novelView',
    component: () => import('../views/NovelChapterView.vue')
  },
    {
    path: '/novelRead/:novelName/:page',
    name: 'novelRead',
    component: () => import('../views/NovelReadView.vue')
  },

  {
    path: '/recommend',
    name: 'recommendView',
    component: () => import('../views/RecommendView.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
